<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="jQueryUI/jquery-ui/jquery-ui.css" />
		<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css"/>
		<link rel="stylesheet" type="text/css" href="css/index.css"/>
	</head>
	<body>

		<div class="loading">
			<img src="img/loading.gif" alt="页面正在加载中" />
		</div>
		
		<main>
			<!--头部-->
			<header>
				<div class="title">
					<span class="pull-left" id="date-title">2017年5月5日 周五</span>
					<span class="pull-right" id="unfinishNum">0项未完成</span>
				</div>
				<div style="clear:both;"></div>
				<div class="date">
					
					<div class="date-btns pull-left" id="btns">
						
						<!--模版生成-->
						
					</div>
					<span class="pull-right" onclick="showFinish(event)">显示已完成</span>
				</div>
				<div style="clear:both;"></div>
			</header>
			<!--内容-->
			<div class="content">
				<ul id="sortable" class="task-list">
					<!--模板生成-->
				</ul>
			</div>
			<!--底部-->
			<div class="footer">
				<div class="icon">
					<span class="glyphicon glyphicon-plus-sign"></span>
				</div>
				<form>
					<input type="text" class='spinner' id="taskText" placeholder="请输入任务">
					<button type="button" class="ui-button ui-widget ui-corner-all" id="addTask">添加</button>
				</form>
			</div>
		</main>
	
		<script src="jQueryUI/jquery-ui/external/jquery/jquery.js"></script>
		<script src="jQueryUI/jquery-ui/jquery-ui.js"></script>
		<script src="bootstrap/js/bootstrap.js"></script>
		<script src="js/template-web.js"></script>
		<script src="layer/layer.js"></script>
		
		<script type="text/html" id="t1">
			<% for(var i = 0; i < weekArr.length; i++){ %>
				<% if (i==1) { %> 
					<button class="ui-button ui-widget ui-corner-all" date-id='<%= dateArr[1] %>' id="timeBtn">今天</button>
				<% } else { %> 
					<button class="ui-button ui-widget ui-corner-all" date-id='<%= dateArr[i]%>' id="timeBtn"><%= weekArr[i] %></button>
					<% } %>
					
			<% } %>
			<!--<input onclick="getDataBtnHandle(event)" type="button" id="datepicker" class="ui-button ui-widget ui-corner-all" value="选择日期" onchange="dateChange(event)">-->
		</script>
		
		<script type="text/html" id="t2">
			{{each data item }}
			{{if item.date == time}}
				<li id="{{item.taskId}}" 
					{{if isShow}}
						{{if item.isFinished}}
						style="display:block;"
						{{else if item.isFinished == false}}
						style="display:none;"
						{{/if}}
					{{else if !isShow}}
						{{if item.isFinished}}
						style="display:none;"
						{{else if item.isFinished == false}}
						style="display:block;"
						{{/if}}
					{{/if}}>
				  	<span>{{item.task}}</span>
				  	<label id="sign" onclick='signFinish(event)'>
						  {{if item.isFinished}}
						  <img src="img/select.png" />
						  {{else if item.isFinished == false}}
						  <img src="img/unselect.png" />
						  {{/if}}
						  
					</label>
		  		</li>
		  	{{/if}}
			{{/each}}
		</script>
		<script src="js/index.js"></script>
		
	</body>
</html>
